<template>
    <view>
        <block name="newsDetail">
            <block v-for="(cellData, idy) in content" :key="idy">
                <view class="p" v-if="cellData.type == 'view'">
                    <block v-for="(item, index) in cellData.child" :key="item.text">
                        <text @tap="stockClick" class="a" :data-seccode="item.attr['data-seccode']" :data-secname="item.attr['data-secname']" v-if="item.type == 'a'">
                            {{ item.text }}
                        </text>

                        <text v-else>{{ item.text }}</text>
                    </block>
                </view>

                <block v-if="cellData.type == 'img'">
                    {{ wn_html_images }}
                    <image
                        @load="imageLoad"
                        class="img"
                        :data-index="idy"
                        mode="widthFix"
                        :src="cellData.attr.src"
                        :style="'width: ' + cellData['attr']['width'] + ';max-width: 100%;height: ' + (cellData['attr']['height'] ? cellData['attr']['height'] : auto)"
                    ></image>
                </block>
            </block>
        </block>
    </view>
</template>

<style>
@import './news.css';
</style>
